<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <body>

        <ui:composition template="./WEB-INF/templates/template.xhtml">

            <ui:define name="content">
                <h1>Create Units</h1>
                <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateTUnitsLabel_id}" for="id" />
                    <h:inputText id="id" value="#{tUnitsController.selected.id}" title="#{bundle.CreateTUnitsTitle_id}" required="true" requiredMessage="#{bundle.CreateTUnitsRequiredMessage_id}"/>
                    <h:outputLabel value="#{bundle.CreateTUnitsLabel_make}" for="make" />
                    <h:inputText id="make" value="#{tUnitsController.selected.make}" title="#{bundle.CreateTUnitsTitle_make}" />
                    <h:outputLabel value="#{bundle.CreateTUnitsLabel_model}" for="model" />
                    <h:inputText id="model" value="#{tUnitsController.selected.model}" title="#{bundle.CreateTUnitsTitle_model}" />
                    <h:outputLabel value="#{bundle.CreateTUnitsLabel_year}" for="year" />
                    <h:inputText id="year" value="#{tUnitsController.selected.year}" title="#{bundle.CreateTUnitsTitle_year}" />
                    <h:outputLabel value="#{bundle.CreateTUnitsLabel_fuelType}" for="fuelType" />
                    <h:inputText id="fuelType" value="#{tUnitsController.selected.fuelType}" title="#{bundle.CreateTUnitsTitle_fuelType}" />
                    <h:outputLabel value="#{bundle.CreateTUnitsLabel_origPurchaseDate}" for="origPurchaseDate" />
                    <h:inputText id="origPurchaseDate" value="#{tUnitsController.selected.origPurchaseDate}" title="#{bundle.CreateTUnitsTitle_origPurchaseDate}" required="true" requiredMessage="#{bundle.CreateTUnitsRequiredMessage_origPurchaseDate}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateTUnitsLabel_owner}" for="owner" />
                    <h:inputText id="owner" value="#{tUnitsController.selected.owner}" title="#{bundle.CreateTUnitsTitle_owner}" />
                    <h:outputLabel value="#{bundle.CreateTUnitsLabel_operator}" for="operator" />
                    <h:inputText id="operator" value="#{tUnitsController.selected.operator}" title="#{bundle.CreateTUnitsTitle_operator}" />
                    <h:outputLabel value="#{bundle.CreateTUnitsLabel_decommFlag}" for="decommFlag" />
                    <h:inputText id="decommFlag" value="#{tUnitsController.selected.decommFlag}" title="#{bundle.CreateTUnitsTitle_decommFlag}" required="true" requiredMessage="#{bundle.CreateTUnitsRequiredMessage_decommFlag}"/>
                    <h:outputLabel value="#{bundle.CreateTUnitsLabel_poNum}" for="poNum" />
                    <h:inputText id="poNum" value="#{tUnitsController.selected.poNum}" title="#{bundle.CreateTUnitsTitle_poNum}" />
                    <h:outputLabel value="#{bundle.CreateTUnitsLabel_serviceNum}" for="serviceNum" />
                    <h:inputText id="serviceNum" value="#{tUnitsController.selected.serviceNum}" title="#{bundle.CreateTUnitsTitle_serviceNum}" />
                    <h:outputLabel value="#{bundle.CreateTUnitsLabel_origPurchasePrice}" for="origPurchasePrice" />
                    <h:inputText id="origPurchasePrice" value="#{tUnitsController.selected.origPurchasePrice}" title="#{bundle.CreateTUnitsTitle_origPurchasePrice}" required="true" requiredMessage="#{bundle.CreateTUnitsRequiredMessage_origPurchasePrice}"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{tUnitsController.create}" value="#{bundle.CreateTUnitsSaveLink}" />
            </h:form>
               
            </ui:define>

        </ui:composition>

    </body>
</html>
